package com.gzr.demo01;

public class TestRunnable2 implements Runnable{
    private String name;

    public TestRunnable2(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println("下载文件名称："+name);
    }

    public static void main(String[] args) {
        //创建三个线程
        TestThreade2 t1 = new TestThreade2("文件1");
        TestThreade2 t2 = new TestThreade2("文件2");
        TestThreade2 t3 = new TestThreade2("文件3");

        //执行线程
        new Thread(t1).start();
        new Thread(t2).start();
        new Thread(t3).start();
        //总结 每次执行都不是顺序的
    }
}
